package com.lnsf.bookstore.web.cart.dao;

import com.lnsf.bookstore.common.dao.BaseDao;
import com.lnsf.bookstore.web.cart.vo.ApiCart;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface ApiCartMapper extends BaseDao<ApiCart>{

    void updateCheck(@Param("bookIds") String[] bookIds,
                     @Param("isChecked") Integer isChecked, @Param("userId") Integer userId);

    void deleteByCart(@Param("userId") Integer userId, @Param("checked") Integer checked);

    int deleteByUserAndBookIds(@Param("userId") Integer userId, @Param("bookIds") int[] bookIds);
}